package cn.itrip.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author Super God Jie
 * @version 1.0  2022-04-14 23:27
 */
@Data
public class HotelPageDTO {
	private String featureIds;

	@DateTimeFormat
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date checkInDate;

	@DateTimeFormat
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date checkOutDate;
	private String hotelLevel;
	private String destination;
	private String keywords;

	private Integer pageNo;
	private Integer pageSize;

	public Integer getPageNo() {
		return pageNo == null || pageNo == 0 ? 1 : pageNo;
	}

	public Integer getPageSize() {
		return pageSize == null || pageSize == 0 ? 10 : pageSize;
	}
}
